/**
* Copyright (c) 2018-present, Chen Guodong
* All rights reserved.
*
* @flow
*/
<template>
  <div class="footer-bar">
    <tabbar style="z-index: 9999;border-top: 1px solid #ccc;">
      <tabbar-item link="/home" :selected="isCurrent('/home')">
        <icon class="iconfont icon-house" slot="icon" style="font-size: 20px;"></icon>
        <span slot="label">首页</span>
      </tabbar-item>
      <tabbar-item link="/projectList" :selected="isCurrent('/projectList')">
        <icon class="iconfont icon-request" slot="icon" style="font-size: 20px;"></icon>
        <span slot="label">项目</span>
      </tabbar-item>
      <tabbar-item link="/mine" :selected="isCurrent('/mine')">
        <icon class="iconfont icon-agreement" slot="icon" style="font-size: 20px;"></icon>
        <span slot="label">我的</span>
      </tabbar-item>
    </tabbar>
  </div>
</template>
<script>
import { Tabbar, TabbarItem } from "vux";

export default {
  data() {
    return {};
  },
  methods: {
    isCurrent(data) {
      // console.log(this.$route.path)
      return this.$route.path === data;
    }
  },
  components: {
    Tabbar,
    TabbarItem
  }
};

</script>
<style lang='less' scoped>
.footer-bar{
  position: fixed;
  left: 0;
  bottom: 0;
  height: 51px;
  position: relative;
  z-index: 99999;
}
</style>
